2024-01-24
Cleaning data
Tidy data
Joining datasets
- Campbell, M., Hinton, J. D. X. & Anderson, J. R. (2019) A systematic review of the relationship between religion and attitudes toward transgender and gender-variant people. International Journal of Transgenderism, 20:1, 21-38, DOI: 10.1080/15532739.2018.1545149
- Earle, M. et al. (2021). A multilevel analysis of LGBT (Lesbian, Gay, Bisexual, Transgender) rights support across 77 countries: The role of contact and country laws . British Journal of Social Psychology. doi:10.1111/bjso.12436
- Flores, A. R. (2015) Attitudes toward transgender rights: perceived knowledge and secondary interpersonal contact, Politics, Groups, and Identities, 3:3, 398-416, DOI: 10.1080/21565503.2015.1050414-
- Flores, A. R., Brown, T. N. T., & Park, A. S. (2016). Public Support for Transgender Rights: A Twenty-three Country Survey. The Williams Institute at UCLA School of Law. <http://www.jstor.org/stable/resrep34965->
- Harrison, B.F., Michelson, M.R. (2019) Gender, Masculinity Threat, and Support for Transgender Rights: An Experimental Study. Sex Roles 80, 63–75. <https://doi.org/10.1007/s11199-018-0916-6>
- Norton, A.T., Herek, G.M. (2013) Heterosexuals’ Attitudes Toward Transgender People: Findings from a National Probability Sample of U.S. Adults. Sex Roles 68, 738–753.
Cell Contents
|-------------------------|
| Count |
| Row Percent |
| Column Percent |
| Total Percent |
| Adj Std Resid |
|-------------------------|
Total Observations in Table: 27438
| df_descriptive$qc19_multinominal
df_descriptive$sd3_cat | Yes | No | Don't know | Row Total |
-----------------------|------------|------------|------------|------------|
Atheist | Agnostic | 3860 | 1458 | 485 | 5803 |
| 66.52% | 25.12% | 8.36% | 21.15% |
| 26.69% | 15.04% | 14.79% | |
| 14.07% | 5.31% | 1.77% | |
| 23.72 | -18.32 | -9.51 | |
-----------------------|------------|------------|------------|------------|
Catholic | 5605 | 4241 | 1352 | 11198 |
| 50.05% | 37.87% | 12.07% | 40.81% |
| 38.75% | 43.74% | 41.22% | |
| 20.43% | 15.46% | 4.93% | |
| -7.32 | 7.30 | 0.51 | |
-----------------------|------------|------------|------------|------------|
Don't know | Refusal | 191 | 175 | 117 | 483 |
| 39.54% | 36.23% | 24.22% | 1.76% |
| 1.32% | 1.81% | 3.57% | |
| 0.70% | 0.64% | 0.43% | |
| -5.85 | 0.42 | 8.39 | |
-----------------------|------------|------------|------------|------------|
Jewish | 34 | 21 | 3 | 58 |
| 58.62% | 36.21% | 5.17% | 0.21% |
| 0.24% | 0.22% | 0.09% | |
| 0.12% | 0.08% | 0.01% | |
| 0.90 | 0.14 | -1.59 | |
-----------------------|------------|------------|------------|------------|
Muslim | 159 | 160 | 73 | 392 |
| 40.56% | 40.82% | 18.62% | 1.43% |
| 1.10% | 1.65% | 2.23% | |
| 0.58% | 0.58% | 0.27% | |
| -4.85 | 2.29 | 4.10 | |
-----------------------|------------|------------|------------|------------|
Orthodox Christian | 1421 | 1959 | 636 | 4016 |
| 35.38% | 48.78% | 15.84% | 14.64% |
| 9.83% | 20.21% | 19.39% | |
| 5.18% | 7.14% | 2.32% | |
| -23.81 | 19.29 | 8.21 | |
-----------------------|------------|------------|------------|------------|
Other | 730 | 425 | 119 | 1274 |
| 57.30% | 33.36% | 9.34% | 4.64% |
| 5.05% | 4.38% | 3.63% | |
| 2.66% | 1.55% | 0.43% | |
| 3.36 | -1.51 | -2.94 | |
-----------------------|------------|------------|------------|------------|
Other Christian | 597 | 449 | 137 | 1183 |
| 50.46% | 37.95% | 11.58% | 4.31% |
| 4.13% | 4.63% | 4.18% | |
| 2.18% | 1.64% | 0.50% | |
| -1.58 | 1.93 | -0.40 | |
-----------------------|------------|------------|------------|------------|
Protestant | 1866 | 807 | 358 | 3031 |
| 61.56% | 26.62% | 11.81% | 11.05% |
| 12.90% | 8.32% | 10.91% | |
| 6.80% | 2.94% | 1.30% | |
| 10.35 | -10.64 | -0.26 | |
-----------------------|------------|------------|------------|------------|
Column Total | 14463 | 9695 | 3280 | 27438 |
| 52.71% | 35.33% | 11.95% | |
-----------------------|------------|------------|------------|------------|
Statistics for All Table Factors
Pearson's Chi-squared test
------------------------------------------------------------
Chi^2 = 1200.107 d.f. = 16 p = 1.412899e-245
Minimum expected frequency: 6.93345
Df Sum Sq Mean Sq F value Pr(>F)
qc19_multinominal 2 111437 55719 171.1 <2e-16 ***
Residuals 27435 8936216 326
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
df_country_2 <-
df_descriptive |>
mutate(qc1_8_ordinal = case_when(
qc1_8_ordinal == "Very wide spread" ~ "Very or fairly wide spread",
qc1_8_ordinal == "Fairly wide spread" ~ "Very or fairly wide spread",
TRUE ~ qc1_8_ordinal
)) |>
group_by(country_name) |>
summarize(
prop_dis_wide = (sum(qc1_8_ordinal == "Very or fairly wide spread") / n())*100,
prop_qc19_yes = (sum(qc19 == 1) / n())*100)
cor(df_country_2$prop_dis_wide, df_country_2$prop_qc19_yes, method = "spearman")[1] 0.4738916
Cell Contents
|-------------------------|
| Count |
| Row Percent |
| Column Percent |
| Total Percent |
| Adj Std Resid |
|-------------------------|
Total Observations in Table: 27438
| df_descriptive$qc19_multinominal
df_descriptive$qc15_1_ordinal | Yes | No | Don't know | Row Total |
------------------------------|------------|------------|------------|------------|
Totally agree | 8494 | 1806 | 776 | 11076 |
| 76.69% | 16.31% | 7.01% | 40.37% |
| 58.73% | 18.63% | 23.66% | |
| 30.96% | 6.58% | 2.83% | |
| 65.45 | -54.25 | -20.79 | |
------------------------------|------------|------------|------------|------------|
Tend to agree | 3949 | 2458 | 948 | 7355 |
| 53.69% | 33.42% | 12.89% | 26.81% |
| 27.30% | 25.35% | 28.90% | |
| 14.39% | 8.96% | 3.46% | |
| 1.97 | -4.02 | 2.89 | |
------------------------------|------------|------------|------------|------------|
Tend to disagree | 1042 | 2297 | 438 | 3777 |
| 27.59% | 60.82% | 11.60% | 13.77% |
| 7.20% | 23.69% | 13.35% | |
| 3.80% | 8.37% | 1.60% | |
| -33.30 | 35.28 | -0.73 | |
------------------------------|------------|------------|------------|------------|
Totally disagree | 690 | 2636 | 458 | 3784 |
| 18.23% | 69.66% | 12.10% | 13.79% |
| 4.77% | 27.19% | 13.96% | |
| 2.51% | 9.61% | 1.67% | |
| -45.75 | 47.58 | 0.31 | |
------------------------------|------------|------------|------------|------------|
Don't know | 288 | 498 | 660 | 1446 |
| 19.92% | 34.44% | 45.64% | 5.27% |
| 1.99% | 5.14% | 20.12% | |
| 1.05% | 1.82% | 2.41% | |
| -25.66 | -0.73 | 40.57 | |
------------------------------|------------|------------|------------|------------|
Column Total | 14463 | 9695 | 3280 | 27438 |
| 52.71% | 35.33% | 11.95% | |
------------------------------|------------|------------|------------|------------|
Statistics for All Table Factors
Pearson's Chi-squared test
------------------------------------------------------------
Chi^2 = 7514.449 d.f. = 8 p = 0
Minimum expected frequency: 172.8581
df_country_3 <-
df_descriptive |>
mutate(qc15_1_ordinal = case_when(
qc15_1_ordinal == "Totally agree" ~ "Totally or tend to agree",
qc15_1_ordinal == "Tend to agree" ~ "Totally or tend to agree",
TRUE ~ qc15_1_ordinal
)) |>
group_by(country_name) |>
summarize(
prop_lgb_yes = (sum(qc15_1_ordinal == "Totally or tend to agree") / n())*100,
prop_qc19_yes = (sum(qc19 == 1) / n())*100)
cor(df_country_3$prop_lgb_yes, df_country_3$prop_qc19_yes, method = "spearman")[1] 0.8768473
Cell Contents
|-------------------------|
| Count |
| Row Percent |
| Column Percent |
| Total Percent |
| Adj Std Resid |
|-------------------------|
Total Observations in Table: 27316
| df_descriptive$qc19_multinominal
df_descriptive$adp_general | Yes | No | Don't know | Row Total |
---------------------------|------------|------------|------------|------------|
0 | 5472 | 4487 | 1734 | 11693 |
| 46.80% | 38.37% | 14.83% | 42.81% |
| 38.05% | 46.43% | 53.03% | |
| 20.03% | 16.43% | 6.35% | |
| -16.75 | 8.94 | 12.59 | |
---------------------------|------------|------------|------------|------------|
1 | 8909 | 5178 | 1536 | 15623 |
| 57.02% | 33.14% | 9.83% | 57.19% |
| 61.95% | 53.57% | 46.97% | |
| 32.61% | 18.96% | 5.62% | |
| 16.75 | -8.94 | -12.59 | |
---------------------------|------------|------------|------------|------------|
Column Total | 14381 | 9665 | 3270 | 27316 |
| 52.65% | 35.38% | 11.97% | |
---------------------------|------------|------------|------------|------------|
Statistics for All Table Factors
Pearson's Chi-squared test
------------------------------------------------------------
Chi^2 = 324.114 d.f. = 2 p = 4.164315e-71
Minimum expected frequency: 1399.77
Dependent Variable (qc19)
It relates to this question:
Do you think that transgender persons should be able to change their civil documents to match their inner gender identity?
We will take the values:
1 for “Yes”
2 for “No”
serialid country_name binary_qc19 male
Mode :logical Mode :logical Mode :logical Mode :logical
FALSE:27438 FALSE:27438 FALSE:24158 FALSE:27438
TRUE :3280
d11 Cat_age_four Cat_age_six Cat_age_seven
Mode :logical Mode :logical Mode :logical Mode :logical
FALSE:27438 FALSE:27438 FALSE:27438 FALSE:27438
political_ideology Religion_cat sd1_7_factor age_stopped_education
Mode :logical Mode :logical Mode :logical Mode :logical
FALSE:22749 FALSE:27438 FALSE:27438 FALSE:25375
TRUE :4689 TRUE :2063
d60_ordinal sd2_5 area_type qc15_1_ordinal
Mode :logical Mode :logical Mode :logical Mode :logical
FALSE:27059 FALSE:27438 FALSE:27424 FALSE:27438
TRUE :379 TRUE :14
iter imp variable
1 1 age_stopped_education
1 2 age_stopped_education
1 3 age_stopped_education
1 4 age_stopped_education
1 5 age_stopped_education
2 1 age_stopped_education
2 2 age_stopped_education
2 3 age_stopped_education
2 4 age_stopped_education
2 5 age_stopped_education
3 1 age_stopped_education
3 2 age_stopped_education
3 3 age_stopped_education
3 4 age_stopped_education
3 5 age_stopped_education
4 1 age_stopped_education
4 2 age_stopped_education
4 3 age_stopped_education
4 4 age_stopped_education
4 5 age_stopped_education
5 1 age_stopped_education
5 2 age_stopped_education
5 3 age_stopped_education
5 4 age_stopped_education
5 5 age_stopped_education
iter imp variable
1 1 age_stopped_education
1 2 age_stopped_education
1 3 age_stopped_education
1 4 age_stopped_education
1 5 age_stopped_education
2 1 age_stopped_education
2 2 age_stopped_education
2 3 age_stopped_education
2 4 age_stopped_education
2 5 age_stopped_education
3 1 age_stopped_education
3 2 age_stopped_education
3 3 age_stopped_education
3 4 age_stopped_education
3 5 age_stopped_education
4 1 age_stopped_education
4 2 age_stopped_education
4 3 age_stopped_education
4 4 age_stopped_education
4 5 age_stopped_education
5 1 age_stopped_education
5 2 age_stopped_education
5 3 age_stopped_education
5 4 age_stopped_education
5 5 age_stopped_education
iter imp variable
1 1 age_stopped_education
1 2 age_stopped_education
1 3 age_stopped_education
1 4 age_stopped_education
1 5 age_stopped_education
2 1 age_stopped_education
2 2 age_stopped_education
2 3 age_stopped_education
2 4 age_stopped_education
2 5 age_stopped_education
3 1 age_stopped_education
3 2 age_stopped_education
3 3 age_stopped_education
3 4 age_stopped_education
3 5 age_stopped_education
4 1 age_stopped_education
4 2 age_stopped_education
4 3 age_stopped_education
4 4 age_stopped_education
4 5 age_stopped_education
5 1 age_stopped_education
5 2 age_stopped_education
5 3 age_stopped_education
5 4 age_stopped_education
5 5 age_stopped_education
iter imp variable
1 1 age_stopped_education
1 2 age_stopped_education
1 3 age_stopped_education
1 4 age_stopped_education
1 5 age_stopped_education
2 1 age_stopped_education
2 2 age_stopped_education
2 3 age_stopped_education
2 4 age_stopped_education
2 5 age_stopped_education
3 1 age_stopped_education
3 2 age_stopped_education
3 3 age_stopped_education
3 4 age_stopped_education
3 5 age_stopped_education
4 1 age_stopped_education
4 2 age_stopped_education
4 3 age_stopped_education
4 4 age_stopped_education
4 5 age_stopped_education
5 1 age_stopped_education
5 2 age_stopped_education
5 3 age_stopped_education
5 4 age_stopped_education
5 5 age_stopped_education
In order to do the multi-leveled analysis we used a generalized linear mixed-effects model (GLMM), where country_name was the variable used as the random effects.
glm_model_2 <- glmer(binary_qc19 ~ male + d11 + I(d11^2) + political_ideology +
Religion_cat + sd1_7_factor + d60_ordinal + qc15_1_ordinal +
prop_gndr_bin + prop_dis_wide + Unemployment + (1 | country_name),
data = Data, family = binomial,
control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 100000)))
summary(glm_model_2)Generalized linear mixed model fit by maximum likelihood (Laplace
Approximation) [glmerMod]
Family: binomial ( logit )
Formula:
binary_qc19 ~ male + d11 + I(d11^2) + political_ideology + Religion_cat +
sd1_7_factor + d60_ordinal + qc15_1_ordinal + prop_gndr_bin +
prop_dis_wide + Unemployment + (1 | country_name)
Data: Data
Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
AIC BIC logLik deviance df.resid
20435.5 20704.5 -10183.7 20367.5 20171
Scaled residuals:
Min 1Q Median 3Q Max
-6.4039 -0.6105 0.3309 0.5685 5.9159
Random effects:
Groups Name Variance Std.Dev.
country_name (Intercept) 0.1296 0.3601
Number of obs: 20205, groups: country_name, 28
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.234e-01 3.008e-01 1.075 0.28233
male -3.591e-01 3.530e-02 -10.173 < 2e-16 ***
d11 2.836e-02 5.113e-03 5.547 2.91e-08 ***
I(d11^2) -3.173e-04 4.961e-05 -6.396 1.60e-10 ***
political_ideology2 7.860e-02 1.162e-01 0.676 0.49888
political_ideology3 -2.507e-02 9.270e-02 -0.270 0.78683
political_ideology4 -1.105e-01 9.138e-02 -1.209 0.22670
political_ideology5 -1.462e-01 7.872e-02 -1.857 0.06331 .
political_ideology6 -2.897e-01 8.955e-02 -3.235 0.00122 **
political_ideology7 -5.223e-01 8.989e-02 -5.811 6.21e-09 ***
political_ideology8 -5.675e-01 9.178e-02 -6.183 6.28e-10 ***
political_ideology9 -5.556e-01 1.228e-01 -4.524 6.08e-06 ***
political_ideologyRight -1.360e-01 9.751e-02 -1.395 0.16296
Religion_catCatholic -2.401e-01 5.519e-02 -4.350 1.36e-05 ***
Religion_catJewish 2.438e-01 3.697e-01 0.659 0.50959
Religion_catMuslim -7.643e-01 1.584e-01 -4.826 1.39e-06 ***
Religion_catOrthodox Christian -2.567e-01 9.259e-02 -2.772 0.00557 **
Religion_catOther -2.329e-01 1.798e-01 -1.295 0.19532
Religion_catOther Christian -4.322e-01 9.184e-02 -4.706 2.52e-06 ***
Religion_catOther Religion -2.094e-01 8.803e-02 -2.379 0.01737 *
Religion_catProtestant -1.982e-01 7.172e-02 -2.763 0.00572 **
sd1_7_factorNo -6.139e-01 6.735e-02 -9.114 < 2e-16 ***
sd1_7_factorRefusal (SPONTANEOUS) -8.757e-01 1.729e-01 -5.064 4.11e-07 ***
sd1_7_factorDon't know -5.918e-01 1.226e-01 -4.827 1.39e-06 ***
d60_ordinalFrom time to time 1.609e-01 7.497e-02 2.147 0.03180 *
d60_ordinalAlmost never/ never 3.073e-01 7.238e-02 4.246 2.18e-05 ***
qc15_1_ordinalTend to agree -8.462e-01 4.518e-02 -18.731 < 2e-16 ***
qc15_1_ordinalTend to disagree -1.922e+00 5.607e-02 -34.277 < 2e-16 ***
qc15_1_ordinalTotally disagree -2.359e+00 6.343e-02 -37.196 < 2e-16 ***
qc15_1_ordinalDon't know -1.745e+00 1.023e-01 -17.060 < 2e-16 ***
prop_gndr_bin 4.360e+00 5.621e-01 7.758 8.66e-15 ***
prop_dis_wide -1.731e+00 7.248e-01 -2.388 0.01693 *
Unemployment 6.801e-02 2.574e-02 2.643 0.00822 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fit warnings:
Some predictor variables are on very different scales: consider rescaling
optimizer (bobyqa) convergence code: 0 (OK)
Model failed to converge with max|grad| = 6.03438 (tol = 0.002, component 1)
Model is nearly unidentifiable: very large eigenvalue
- Rescale variables?
Model is nearly unidentifiable: large eigenvalue ratio
- Rescale variables?
The model was clearly overfitted. And it suggested we have scaling issue. We fix this and move to remove the non-significant variables.
Generalized linear mixed model fit by maximum likelihood (Laplace
Approximation) [glmerMod]
Family: binomial ( logit )
Formula:
binary_qc19 ~ male + d11 + I(d11^2) + political_ideology + Religion_cat +
sd1_7_factor + d60_ordinal + qc15_1_ordinal + prop_gndr_bin +
prop_dis_wide + Unemployment + (1 | country_name)
Data: Data
Control: glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 1e+05))
AIC BIC logLik deviance df.resid
20435.4 20704.5 -10183.7 20367.4 20171
Scaled residuals:
Min 1Q Median 3Q Max
-6.4121 -0.6099 0.3306 0.5684 5.9260
Random effects:
Groups Name Variance Std.Dev.
country_name (Intercept) 0.1296 0.3601
Number of obs: 20205, groups: country_name, 28
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.34649 0.29755 4.525 6.03e-06 ***
male -0.35962 0.03531 -10.184 < 2e-16 ***
d11 -0.07900 0.01901 -4.155 3.26e-05 ***
I(d11^2) -0.10476 0.01764 -5.940 2.85e-09 ***
political_ideology2 0.07868 0.11625 0.677 0.49854
political_ideology3 -0.02514 0.09271 -0.271 0.78627
political_ideology4 -0.11062 0.09140 -1.210 0.22615
political_ideology5 -0.14639 0.07873 -1.859 0.06297 .
political_ideology6 -0.29010 0.08956 -3.239 0.00120 **
political_ideology7 -0.52306 0.08990 -5.818 5.95e-09 ***
political_ideology8 -0.56835 0.09180 -6.191 5.98e-10 ***
political_ideology9 -0.55644 0.12287 -4.529 5.93e-06 ***
political_ideologyRight -0.13620 0.09752 -1.397 0.16254
Religion_catCatholic -0.24032 0.05520 -4.354 1.34e-05 ***
Religion_catJewish 0.24420 0.36975 0.660 0.50897
Religion_catMuslim -0.76531 0.15838 -4.832 1.35e-06 ***
Religion_catOrthodox Christian -0.25703 0.09259 -2.776 0.00550 **
Religion_catOther -0.23311 0.17985 -1.296 0.19493
Religion_catOther Christian -0.43283 0.09186 -4.712 2.46e-06 ***
Religion_catOther Religion -0.20964 0.08805 -2.381 0.01727 *
Religion_catProtestant -0.19850 0.07174 -2.767 0.00566 **
sd1_7_factorNo -0.61463 0.06737 -9.123 < 2e-16 ***
sd1_7_factorRefusal (SPONTANEOUS) -0.87689 0.17296 -5.070 3.98e-07 ***
sd1_7_factorDon't know -0.59259 0.12263 -4.832 1.35e-06 ***
d60_ordinalFrom time to time 0.16122 0.07498 2.150 0.03153 *
d60_ordinalAlmost never/ never 0.30780 0.07240 4.252 2.12e-05 ***
qc15_1_ordinalTend to agree -0.84747 0.04519 -18.754 < 2e-16 ***
qc15_1_ordinalTend to disagree -1.92485 0.05608 -34.322 < 2e-16 ***
qc15_1_ordinalTotally disagree -2.36292 0.06345 -37.239 < 2e-16 ***
qc15_1_ordinalDon't know -1.74740 0.10229 -17.083 < 2e-16 ***
prop_gndr_bin 4.37191 0.55935 7.816 5.45e-15 ***
prop_dis_wide -1.73795 0.72266 -2.405 0.01618 *
Unemployment 0.22143 0.08374 2.644 0.00819 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
We compared a few models with different transformations and different variables and end up with the best model, to this one.
Results of GLMM Analysis
=============================================================
Dependent variable:
---------------------------
binary_qc19
-------------------------------------------------------------
male -0.360***
(0.035)
d11 -0.079***
(0.019)
I(d112) -0.105***
(0.018)
political_ideology2 0.079
(0.116)
political_ideology3 -0.025
(0.093)
political_ideology4 -0.111
(0.091)
political_ideology5 -0.146*
(0.079)
political_ideology6 -0.290***
(0.090)
political_ideology7 -0.523***
(0.090)
political_ideology8 -0.568***
(0.092)
political_ideology9 -0.556***
(0.123)
political_ideologyRight -0.136
(0.098)
Religion_catCatholic -0.240***
(0.055)
Religion_catJewish 0.244
(0.370)
Religion_catMuslim -0.765***
(0.158)
Religion_catOrthodox Christian -0.257***
(0.093)
Religion_catOther -0.233
(0.180)
Religion_catOther Christian -0.433***
(0.092)
Religion_catOther Religion -0.210**
(0.088)
Religion_catProtestant -0.198***
(0.072)
sd1_7_factorNo -0.615***
(0.067)
sd1_7_factorRefusal (SPONTANEOUS) -0.877***
(0.173)
sd1_7_factorDon't know -0.593***
(0.123)
d60_ordinalFrom time to time 0.161**
(0.075)
d60_ordinalAlmost never/ never 0.308***
(0.072)
qc15_1_ordinalTend to agree -0.847***
(0.045)
qc15_1_ordinalTend to disagree -1.925***
(0.056)
qc15_1_ordinalTotally disagree -2.363***
(0.063)
qc15_1_ordinalDon't know -1.747***
(0.102)
prop_gndr_bin 4.372***
(0.559)
prop_dis_wide -1.738**
(0.723)
Unemployment 0.221***
(0.084)
Constant 1.346***
(0.298)
-------------------------------------------------------------
Observations 20,205
Log Likelihood -10,183.720
Akaike Inf. Crit. 20,435.440
Bayesian Inf. Crit. 20,704.510
=============================================================
Note: *p<0.1; **p<0.05; ***p<0.01
[1] 20435.44
[1] 20704.51
Gender Influence: Females show higher odds of support compared to males, potentially reflecting societal gender roles and perceptions.
Age Dynamics: Support increases with age up to a point, then declines, suggesting life experiences or generational shifts might influence attitudes toward inclusivity.
Political Ideology: Conservative alignment correlates with less support for transgender individuals’ rights to change civil documents, showing a 22.8% decrease in support.
Religious Impact: Catholic individuals show 21.2% less support, while Jewish individuals are slightly more supportive, though the latter is very small.
Economic Stability: Individuals with no difficulty paying bills are more supportive, linking economic security with supportive attitudes.
Contact with Transgender Individuals: Lack of contact is associated with a 45.5% decrease in support, highlighting the importance of visibility and personal relationships.
Sexual Minority and Support: Non-members of sexual minorities are less supportive of transgender rights for document changes.
Country-Level Factors: General support for a third gender option and awareness of discrimination correlate with supportive attitudes.
We aim to build a model to predict support for transgender individuals to change legal documents.
Model = binary_qc19 ~ male + d11 + I(d11^2) + political_ideology + Religion_cat + sd1_7_factor + d60_ordinal + qc15_1_ordinal + Unemployment + prop_gndr_bin + prop_dis_wide
Confusion Matrix and Statistics
Reference
Prediction No Yes
No 1173 601
Yes 408 1898
Accuracy : 0.7527
95% CI : (0.7392, 0.7659)
No Information Rate : 0.6125
P-Value [Acc > NIR] : < 2.2e-16
Kappa : 0.4904
Mcnemar's Test P-Value : 1.499e-09
Sensitivity : 0.7419
Specificity : 0.7595
Pos Pred Value : 0.6612
Neg Pred Value : 0.8231
Prevalence : 0.3875
Detection Rate : 0.2875
Detection Prevalence : 0.4348
Balanced Accuracy : 0.7507
'Positive' Class : No
The selected predictive model for our international analysis is Gradient Boosting (GB).
GB not only has one of the highest Accuracy levels but also achieves the most balanced rates of Specificity and Sensitivity. Such a robust performance profile makes it the optimal choice for our data set.
We found that this model, is the most adept and effective at predicting whether countries will support the right of transgender individuals to change their civil documents.